﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ChangeStore.aspx.cs" Inherits="H2.NET.Web.Pages.SMD.ChangeStore" %>

<%@ Register Src="../../Controls/DwzAssessment.ascx" TagName="DwzAssessment" TagPrefix="uc" %>
<%@ Register Src="../../Controls/DwzAssessmentList.ascx" TagName="DwzAssessmentList" TagPrefix="uc" %>
<%@ Register Src="../../Controls/AjaxUpload.ascx" TagName="ajaxUpload" TagPrefix="uc" %>
<%@ Register Src="uc_search_store.ascx" TagName="uc_search_store" TagPrefix="uc" %>
<%@ Register Src="uc_change_field.ascx" TagName="uc_change_field" TagPrefix="uc" %>
<%@ Register Src="uc_search_subdealer.ascx" TagName="uc_search_subdealer" TagPrefix="uc" %>
<%@ Register Src="uc_search_bmc.ascx" TagName="uc_search_bmc" TagPrefix="uc" %>
<%@ Register Src="uc_search_accountowner.ascx" TagName="uc_search_accountowner" TagPrefix="uc" %>
<%@ Register Src="uc_dealer.ascx" TagName="uc_dealer" TagPrefix="uc" %>
<%@ Register Src="uc_head.ascx" TagName="uc_head" TagPrefix="uc1" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" />
<head id="Head1" runat="server">
    <title>门店主数据变更</title>
    <link href="<%=Page.ResolveUrl("~/Resource/Css/Style.css")%>" type="text/css" rel="stylesheet" />
    <link href="<%=Page.ResolveUrl("~/Resource/jBox/Blue/jbox.css")%>" rel="stylesheet" type="text/css" />
    <link href="<%=Page.ResolveUrl("~/Resource/Css/validform.css")%>" rel="stylesheet" type="text/css" />
    <link href="<%=Page.ResolveUrl("~/Resource/qtip/jquery.qtip.min.css")%>" rel="stylesheet" type="text/css" />
    <script src="<%=Page.ResolveUrl("~/Resource/dwz/js/jquery-1.7.2.min.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Resource/Js/Common.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Resource/Js/jquery.money.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Resource/jBox/jquery.jBox-2.3.min.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Resource/jBox/jquery.jBox-zh-CN.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Resource/Js/Validform_v5.3.2.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Resource/My97DatePicker/WdatePicker.js")%>" type="text/javascript"></script>
    <script src="<%=Page.ResolveUrl("~/Resource/qtip/jquery.qtip.min.js")%>" type="text/javascript"></script>
    <script type="text/javascript">
        var time = "";

        $(function () {

            var storeType = typeof ($("#l_storeType").text()) == undefined || $("#l_storeType").text() == '' ? $("#storeType option:selected").text() : $("#l_storeType").text();
            var store_type = storeType.replace("（", "(").replace("）", ")");
            var type = store_type.substring(0, store_type.indexOf("(")).trim().toUpperCase();

            //if (type == "DCSS" || type == "DDCN") { $("#tb_store_name").attr("readonly", "readonly"); } else { $("#tb_store_name").removeAttr("readonly"); }

            ChangeStoreStatus($("#ddl_StoreStatus"));


            $("#tb_OpenBusinessDate").removeAttr("datatype").removeAttr("nullmsg");


            /* 初始化相关样式、表单验证提示 st */
            $("[datatype='*']").after("<em class='required'>*</em>");
            $("#form1").Validform({
                tipSweep: true,
                tiptype: function (msg, o, cssctl) {
                    if (o.type == 3) {
                        $.jBox.tip(msg, 'info');
                    }
                }
            });
            /* 初始化相关样式、表单验证提示 ed */

            // 双击选择门店之后跳转的url

            $("#return_url").val('<%= Page.ResolveUrl("~/Pages/SMD/ChangeStore.aspx?TaskID=" + TaskAPI.TaskID)%>');


            /* 初始化控件提示 st */
            $.ajax({
                type: 'POST',
                url: '<%=Page.ResolveUrl("~/pages/smd/ajaxtools/handler.ashx?action=get_tips")%>',
                data: { pagename: 'changestore.aspx' },
                dataType: "json",
                cache: false,
                success: function (json) {
                    for (var o in json) {
                        var ControlID = json[o].ControlID;
                        var Content = json[o].Content;
                        $("#" + ControlID).qtip({
                            content: Content
                        });
                    }
                }
            });
            /* 初始化控件提示 ed */

            /* 门店地址生成 */
            $("#uc_dealer1_dealer_shortname,#tb_MallShortName").keyup(function () {
                createStoreName();
            });
            $("#ddl_ShopSeq,#ddl_cityName").change(function () {
                createStoreName();
            });
            $("#storeType").change(function () {
                var store_type = $("#storeType option:selected").text();
                if (store_type.indexOf("多乐士") > 0) {
                    $("#ddl_channel").find("option[value='多乐士']").attr("selected", true);
                } else if (store_type.indexOf("来威") > 0) {
                    $("#ddl_channel").find("option[value='来威']").attr("selected", true);
                }
                createStoreName();
            });
            $("#tb_province,#tb_MallName,#tb_HouseNumber").keyup(function () {
                createAddress();
            });
            $("#ddl_cityName").change(function () {
                createAddress();
            });
        });

        /*门店名称生成 城市 + 经销商简称 + 建材市场或街道简称 + 店面类型 + 店序号*/
        function createStoreName() {
            var storeType = typeof (($("#l_storeType").text()) == undefined || $("#l_storeType").text() == '') ? $("#storeType option:selected").text() : $("#l_storeType").text();
            var store_type = storeType.replace("（", "(").replace("）", ")");
            var type = store_type.substring(0, store_type.indexOf("(")).trim().toUpperCase();        
            //if (type == "DCSS" || type == "DDCN") {
                var name = "";
                name += Isnullorempty($("#ddl_cityName").val());//城市
                name += Isnullorempty($("#uc_dealer1_dealer_shortname").val()) == "" ? Isnullorempty($("#uc_dealer1_dealer_shortname_label").text()) == "" ? "" : Isnullorempty($("#uc_dealer1_dealer_shortname_label").text()) : Isnullorempty($("#uc_dealer1_dealer_shortname").val());//经销商简称
                name += Isnullorempty($("#tb_MallShortName").val());//建材市场或街道简称

                name += store_type.replace("（", "(").replace("）", ")").substring(store_type.indexOf("(") + 1, store_type.indexOf(")") + 1);
                //name += $("#l_storeType").val().replace("（", "(").replace("）", ")").substring($("#l_storeType").val().indexOf("(") + 1, $("#l_storeType").val().indexOf(")"));//店面类型
                name += $("#ddl_ShopSeq").val();
                $("#tb_store_name").val(name);
            //}
        }
        function createAddress() {
            var name = "";
            name += Isnullorempty($("#tb_province").val());
            name += Isnullorempty($("#ddl_cityName").val());
            name += Isnullorempty($("#tb_MallName").val());
            name += Isnullorempty($("#tb_HouseNumber").val());
            if((name.indexOf("上海上海市")>-1)||(name.indexOf("北京北京市")>-1)||(name.indexOf("重庆重庆市")>-1)||(name.indexOf("天津天津市")>-1))
            {
                name = name.substring(2);
            }
            $("#tb_address").val(name);
         

        }


        /*去除*/
        function Isnullorempty(str) {
            if (str == null) return "";
            if (str.length == 0) return "";
            if (/^\s*$/i.test(str)) return "";
            if (str == undefined) return "";
            return str;
        }

        /* 打开选择门店窗体 st */
        function openStoreDialog(obj) {
            if ($(obj).hasClass("search")) {
                $.jBox("id:search_store", {
                    title: "双击选择门店",
                    width: 650,
                    height: 500,
                    buttons: {}
                });
            }
        }
        /* 打开选择门店窗体 ed */

        /* 提交表单 st */
        function confirmSubmit() {

            if ($("#DwzAssessment1_StepLabel").html() == "提交数据") {
                alert("请确保门店状态准确！");
            }

            if (window.confirm("确认要提交吗？")) {
                $.jBox.tip('正在处理，请稍等...', 'loading');
                return true;
            }
            return false;
        }
        /* 提交表单 ed */

        /* 地区级联 st */
        function initProvince(arg) {
            $.jBox.closeTip();
            var val = $(arg).val();
            var id = $(arg).attr("id");
            if ($.trim(val)) {
                $.ajax({
                    type: 'POST',
                    url: '<%=Page.ResolveUrl("~/pages/smd/store.aspx?action=initProvince")%>',
                    data: { ar: val, type: (id == "ddl_province" ? "province" : "city") },
                    dataType: "json",
                    cache: false,
                    success: function (json) {
                        var rst = json.navTabId.split("|");
                        var html = "";
                        for (var i = 0; i < rst.length; i++) {
                            if (rst[i]) {
                                var list = rst[i].split(",");
                                html += "<option value='" + list[0] + "'>" + list[1] + "</option>";
                            }
                        }
                        if (id == "ddl_province") {
                            $("#ddl_cityName").find("option:gt(0)").remove().end().append(html);

                        }
                        else {
                            $("#ddl_province").find("option:gt(0)").remove().end().append(html);
                            $("#ddl_cityName").find("option:gt(0)").remove();
                        }
                    }
                });
            }
            else {
                if (id == "ddl_province") {
                    $("#ddl_cityName").find("option:gt(0)").remove();

                }
                else {
                    $("#ddl_province").find("option:gt(0)").remove();
                    $("#ddl_cityName").find("option:gt(0)").remove();
                }
            }
        }
        /* 地区级联 ed */


        $(function () {
            <%if (contractStartDate != "")
              {%>
            $("#tb_OpenBusinessDate").qtip({
                content: "合同起始日期：<%:contractStartDate%>"
            });
            //$.jBox.tip("合同起始日期为:"<%:contractStartDate%>, "info");
            <%}%>
            $("#cb_IsUpgraded").click(function () {
                IsUpgradedFunction(this);
            });

            $("#cb_IsDowngraded").click(function () {
                IsDowngradedFunction(this);
            });

            $("#cb_IsRenew").click(function () {
                isRenewFunction(this);
            });

            $("#ddl_NewFitment").change(function () {
                if ($(this).val() == "全新门店") {
                    $("#FirstStartDate").val($("#tb_OpenBusinessDate").val());
                    $("#tb_CurrentStartDate").val($("#tb_OpenBusinessDate").val());
                } else if ($(this).val().indexOf("升级") > 0) {
                    $("#tb_CurrentStartDate").val($("#tb_OpenBusinessDate").val());
                } else if ($(this).val() == "翻新") {
                    if ($("#cb_IsRenew").attr("checked") != "checked") {
                        $("#cb_IsRenew").click();
                        isRenewFunction($("#cb_IsRenew"));
                    }
                }

            });

            IsUpgradedFunction($("#cb_IsUpgraded"));

            IsDowngradedFunction($("#cb_IsDowngraded"));

            isRenewFunction($("#cb_IsRenew"));
        });

        function IsUpgradedFunction(obj) {
            if ($(obj).attr("checked") == "checked") {
                $("#ddl_BeforeUpgradedType").show();
                $("#ddl_BeforeUpgradedType").attr("datatype", "*").after("<em class='required'>*</em>");
            } else {
                $("#ddl_BeforeUpgradedType").hide();
                $("#ddl_BeforeUpgradedType").attr("datatype", "").parent().find("em").remove();
            }
        }

        function IsDowngradedFunction(obj) {
            if ($(obj).attr("checked") == "checked") {
                $("#ddl_BeforeDowngradedType").show();
                $("#ddl_BeforeDowngradedType").attr("datatype", "*").after("<em class='required'>*</em>");
            } else {
                $("#ddl_BeforeDowngradedType").hide();
                $("#ddl_BeforeDowngradedType").attr("datatype", "").parent().find("em").remove();
            }
        }

        function isRenewFunction(obj) {
            if ($(obj).attr("checked") == "checked") {
                //$("#ddl_BeforeRenewType").show();
                //$("#ddl_BeforeRenewType").attr("datatype", "*").after("<em class='required'>*</em>");
                $("#tb_LastRenewDate").show();
                $("#tb_LastRenewDate").attr("datatype", "*").after("<em class='required'>*</em>");
            } else {
                //$("#ddl_BeforeRenewType").hide();
                //$("#ddl_BeforeRenewType").attr("datatype", "").parent().find("em").remove();
                //$("#tb_LastRenewDate").hide();
                //$("#tb_LastRenewDate").attr("datatype", "").parent().find("em").remove();
            }
        }

        function ChangeStoreStatus(obj) {

            $(obj).parent().attr("colspan", "3");
            $(".yy").each(function () {
                $(this).hide();
            });


            //if ($(obj).val() == "营业") {
            //    $("#tb_OpenBusinessDate").attr({ "datatype": "*", "nullmsg": "请选择启动营业时间" });
            //} else {
            //    $("#tb_OpenBusinessDate").removeAttr("datatype").removeAttr("nullmsg");
            //}

            // 只读表单
            if ($("#l_StoreStatus").text() == "营业") {
                //$(obj).parent().attr("colspan", "1");
                //$(".yy").show();
            }
        }

        function dealerCallBack() {
            var region = $("#uc_dealer1_dealer_region_label").text();
            var province = $("#uc_dealer1_dealer_province_label").text();

            $("#tb_region").val(region);
            $("#tb_province").val(province);

            $.ajax({
                type: 'POST',
                url: '<%=Page.ResolveUrl("~/pages/smd/AjaxTools/handler.ashx?action=search_city")%>',
                data: { province: province },
                cache: false,
                success: function (result) {
                    var names = result.split(",");
                    $("#ddl_cityName").html("");
                    var html = "<option value=''>==请选择==</option>";
                    for (var i = 0; i < names.length; i++) {
                        if (names[i].length > 0) {
                            html += "<option value='" + names[i] + "'>" + names[i] + "</option>";
                        }
                    }
                    $("#ddl_cityName").html(html);

                    createAddress();
                }
            });
        }

        function checkownertype() {

            if ($("#cb_ownertype").attr("checked")) {
                $("#subdealercode").css("display", "inline");
            }
            else {
                //document.getElementById("subdealercode").style.visibility = false;
                $("#subdealercode").css("display", "none");
                $("#subdealercode").val("");
                $("#l_subdealername").html("");
            }

        }

        function SearchSubdealer() {
            $.jBox("id:search_subdealer", {
                title: "单击选择分销",
                width: 800,
                height: 500,
                buttons: {}
            });
        }

        function SearchBMC() {
            $.jBox("id:search_bmc", {
                title: "单击选择建材市场",
                width: 800,
                height: 500,
                buttons: {}
            });
        }

        function SearchAccountOwner() {
            $.jBox("id:search_accountowner", {
                title: "单击选择负责销售",
                width: 800,
                height: 500,
                buttons: {}
            });
        }

    </script>
</head>
<body>
    <div class="flowpage">
        <form id="form1" runat="server">
            <input type="hidden" id="RestrictDealer" name="RestrictDealer" value="false" />

            <!-- 标题 st -->
            <uc1:uc_head ID="uc_head1" runat="server" />
            <!-- 标题 ed -->

            <!-- 门店信息 st -->
            <table class="formTable" style="width: 100%;">
                <!-- 经销商信息 st -->
                <uc:uc_dealer ID="uc_dealer1" runat="server" />
                <!-- 经销商信息 ed -->

                <!-- 门店信息 st -->
                <tbody id="tbody_store" runat="server">
                    <tr>
                        <td class="title" colspan="6" onclick="createStoreName()" onclick="createAddress()">门店信息（通用）</td>
                    </tr>
                    <tr>
                        <th>门店授权号：
                        </th>
                        <td>
                            <asp:TextBox ID="tb_authId" runat="server" onclick="openStoreDialog(this)" ReadOnly="true" CssClass="search"></asp:TextBox>
                            <asp:Label ID="l_authId" runat="server"></asp:Label>
                        </td>
                        <th><strong style="color: red">门店状态：</strong></th>
                        <td>
                            <asp:DropDownList ID="ddl_StoreStatus" runat="server" datatype="*" nullmsg="请选择门店状态" onChange="ChangeStoreStatus(this)"></asp:DropDownList>
                            <asp:Label ID="l_StoreStatus" runat="server"></asp:Label>
                        </td>
                        <th class="yy">启动营业时间：</th>
                        <td class="yy">
                            <asp:TextBox ID="tb_OpenBusinessDate" runat="server" CssClass="Wdate" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd'})"></asp:TextBox>
                            <asp:Label ID="l_OpenBusinessDate" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th><b>系统审批日期：</b></th>
                        <td>
                            <asp:TextBox ID="tb_StoreApprovedDate" runat="server" CssClass="Wdate" onfocus="WdatePicker()"></asp:TextBox>
                            <asp:Label ID="l_StoreApprovedDate" runat="server"></asp:Label>
                        </td>
                        <th><b>系统流水号：</b></th>
                        <td colspan="3">
                            <asp:TextBox ID="tb_EapproveSN" runat="server"></asp:TextBox>
                            <asp:Label ID="l_EapproveSN" runat="server"></asp:Label>
                        </td>

                    </tr>
                    <tr>
                        <th>门店类型：</th>
                        <td>
                            <asp:DropDownList ID="storeType" runat="server" Width="170px" Style="display: none" nullmsg="请选择门店类型"></asp:DropDownList>
                            <asp:Label ID="l_storeType" runat="server"></asp:Label>
                        </td>
                        <th>渠道：</th>
                        <td>
                            <asp:DropDownList ID="ddl_channel" runat="server" datatype="*" nullmsg="请选择渠道"></asp:DropDownList>
                            <asp:Label ID="l_channel" runat="server"></asp:Label>
                        </td>
                        <th>门店装修类型：</th>
                        <td>
                            <asp:DropDownList ID="ddl_NewFitment" runat="server"></asp:DropDownList>
                            <asp:Label ID="l_NewFitment" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>

                        <th>门店区域：</th>
                        <td>
                            <asp:TextBox ID="tb_region" runat="server" ReadOnly="true"></asp:TextBox>
                            <asp:Label ID="l_region" runat="server"></asp:Label>
                        </td>
                        <th>门店省份：</th>
                        <td>
                            <asp:TextBox ID="tb_province" runat="server" ReadOnly="true"></asp:TextBox>
                            <asp:Label ID="l_province" runat="server"></asp:Label>
                        </td>
                        <th>门店城市：</th>
                        <td>
                            <asp:DropDownList ID="ddl_cityName" runat="server" datatype="*" nullmsg="请选择门店城市">
                                <asp:ListItem Text="==请选择==" Value=""></asp:ListItem>
                            </asp:DropDownList>
                            <asp:Label ID="l_cityName" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>市场/街道简称：</th>
                        <td>
                            <asp:TextBox ID="tb_MallShortName" runat="server" datatype="*" nullmsg="请填写市场/街道简称"></asp:TextBox>
                            <asp:Label ID="l_MallShortName" runat="server"></asp:Label>
                        </td>
                        <th>市场/街道全名：</th>
                        <td>
                            <asp:TextBox ID="tb_MallName" runat="server"></asp:TextBox>
                            <asp:Label ID="l_MallName" runat="server"></asp:Label>
                        </td>
                        <th>门牌号：</th>
                        <td>
                            <asp:TextBox ID="tb_HouseNumber" runat="server"></asp:TextBox>
                            <asp:Label ID="l_HouseNumber" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>区/县/县级市</th>
                        <td colspan="5">
                            <asp:TextBox ID="tb_District" runat="server"></asp:TextBox>
                            <asp:Label ID="l_District" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>门店名称：</th>
                        <td colspan="3">
                            <asp:TextBox ID="tb_store_name" runat="server" Width="500" ></asp:TextBox>
                            <asp:Label ID="l_store_name" runat="server"></asp:Label>
                            <asp:HiddenField ID="hd_store_id" runat="server" />
                        </td>
                        <th>店序号：</th>
                        <td>
                            <asp:DropDownList ID="ddl_ShopSeq" runat="server"></asp:DropDownList>
                            <asp:Label ID="l_ShopSeq" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>联系人：</th>
                        <td>
                            <asp:TextBox ID="tb_ContractPerson" runat="server" datatype="*" nullmsg="请填写联系人"></asp:TextBox>
                            <asp:Label ID="l_ContractPerson" runat="server"></asp:Label>
                        </td>
                        <th>电话：</th>
                        <td colspan="3">
                            <asp:TextBox ID="tb_Telephone" runat="server" datatype="*" nullmsg="请填写联系电话"></asp:TextBox>
                            <asp:Label ID="l_Telephone" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>门店地址：</th>
                        <td colspan="5">
                            <asp:TextBox ID="tb_address" runat="server" Width="500" Readonly="true" datatype="*" nullmsg="请填写门店地址"></asp:TextBox>
                            <asp:Label ID="l_address" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>经度：</th>
                        <td>
                            <asp:TextBox ID="tb_lon" runat="server" datatype="*" nullmsg="请填写经度"></asp:TextBox>
                            <asp:Label ID="l_lon" runat="server"></asp:Label>
                        </td>
                        <th>纬度：</th>
                        <td colspan="3">
                            <asp:TextBox ID="tb_lat" runat="server" datatype="*" nullmsg="请填写纬度"></asp:TextBox>
                            <asp:Label ID="l_lat" runat="server"></asp:Label>
                            <span style="color: red;">请输入6位小数的经纬度，如：13.123456</span>
                        </td>
                    </tr>

                    <tr Style="display: none">
                        <th>是否为分销：</th>
                        <td>
                            <asp:CheckBox ID="cb_ownertype" runat="server" onchange="checkownertype()" />
                        </td>
                        <th>分销商编号：</th>
                        <td>
                            <asp:HiddenField ID="subdealer_id" runat="server" />
                            <asp:TextBox ID="subdealercode" runat="server" CssClass="search" onclick="SearchSubdealer()"></asp:TextBox>
                            <asp:Label ID="l_subdealercode" runat="server"></asp:Label>
                        </td>
                        <th>分销商名称：</th>
                        <td>
                            <asp:Label ID="l_subdealername" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr Style="display: none">
                        <th>建材市场编号：</th>
                        <td>
                            <asp:TextBox ID="bmccode" runat="server" CssClass="search" onclick="SearchBMC()"></asp:TextBox>
                            <asp:Literal ID="l_bmccode" runat="server"></asp:Literal>
                        </td>
                        <th>建材市场名称：</th>
                        <td colspan="3">
                            <asp:Label ID="l_bmcname" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>负责销售：</th>
                        <td>
                            <asp:HiddenField ID="h_windowsid" runat="server" />
                            <asp:TextBox ID="tb_accountowner" runat="server" CssClass="search" onclick="SearchAccountOwner()"></asp:TextBox>
                            <asp:Literal ID="l_accountowner" runat="server"></asp:Literal>
                        </td>
                        <th>微信公众号：</th>
                        <td>
                            <asp:TextBox ID="tb_wechatid" runat="server"></asp:TextBox>
                            <asp:Literal ID="l_wechatid" runat="server"></asp:Literal>
                        </td>
                        <th>CMS账号：</th>
                        <td colspan="2">
                            <asp:Literal ID="l_CMS" runat="server"></asp:Literal>
                        </td>
                    </tr>
                </tbody>
                <!-- 门店信息 ed -->

                <tbody>
                    <tr>
                        <td class="title" colspan="6">门店信息（DDCN&DCSS必填）</td>
                    </tr>
                    <tr>
                        <th>门店建筑面积：</th>
                        <td>
                            <asp:TextBox ID="tb_StoreSize" runat="server"></asp:TextBox>
                            <asp:Label ID="l_StoreSize" runat="server"></asp:Label>
                            M<sup>2</sup>
                        </td>
                        <th>最初开业时间：</th>
                        <td>
                            <asp:TextBox ID="FirstStartDate" runat="server" datatype="*" nullmsg="请选择最初开业时间" CssClass="Wdate" onfocus="WdatePicker()"></asp:TextBox>
                            <asp:Label ID="l_FirstStartDate" runat="server"></asp:Label>
                        </td>
                        <th>目前门店开业时间：
                        </th>
                        <td>
                            <asp:TextBox ID="tb_CurrentStartDate" runat="server" datatype="*" nullmsg="请选择目前门店开业时间" CssClass="Wdate" onfocus="WdatePicker()"></asp:TextBox>
                            <asp:Label ID="l_CurrentStartDate" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>色彩咨询：</th>
                        <td>
                            <asp:CheckBox ID="cb_IsColourService" runat="server" /></td>
                        <th>调色服务：</th>
                        <td>
                            <asp:CheckBox ID="cb_IsTintingService" runat="server" /></td>
                        <th><font style="color: red">官网屏蔽：</font></th>
                        <td>
                            <asp:CheckBox ID="cb_ShowInWebsite" runat="server" Text=" 必须提交DR2审批邮件" /></td>
                    </tr>
                </tbody>

                <tbody>
                    <tr>
                        <td class="title" colspan="6">历史情况</td>
                    </tr>
                    <tr id="tr_storeUpgrad" runat="server">
                        <th>是否为升级：</th>
                        <td>
                            <asp:CheckBox ID="cb_IsUpgraded" runat="server" /></td>
                        <th>升级前门店类型：</th>
                        <td colspan="3">
                            <asp:DropDownList ID="ddl_BeforeUpgradedType" Style="display: none" runat="server">
                            </asp:DropDownList>
                            <asp:Label ID="l_BeforeUpgradedType" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr id="tr_storeDowngrad" runat="server">
                        <th>是否为降级：</th>
                        <td>
                            <asp:CheckBox ID="cb_IsDowngraded" runat="server" /></td>
                        <th>降级前门店类型：</th>
                        <td colspan="3">
                            <asp:DropDownList ID="ddl_BeforeDowngradedType" Style="display: none" runat="server">
                            </asp:DropDownList>
                            <asp:Label ID="l_BeforeDowngradedType" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr id="tr_storeRenew" runat="server">
                        <th>是否有翻新：</th>
                        <td>
                            <asp:CheckBox ID="cb_IsRenew" runat="server" /></td>
                        <th>翻新前门店类型：</th>
                        <td>
                            <asp:DropDownList ID="ddl_BeforeRenewType" Style="display: none; width: 80%" runat="server">
                            </asp:DropDownList>
                            <asp:Label ID="l_BeforeRenewType" runat="server"></asp:Label>
                        </td>
                        <th>最新翻新日期：</th>
                        <td>
                            <span>
                                <asp:TextBox ID="tb_LastRenewDate" runat="server" CssClass="Wdate" onfocus="WdatePicker()"></asp:TextBox>
                            </span>
                            <asp:Label ID="l_LastRenewDate" runat="server"></asp:Label>
                        </td>
                    </tr>
                </tbody>
                <!-- 门店变更表单 ed -->

                <!-- 字段变更列表 st -->
                <tbody id="tb_changelogs" runat="server" visible="false">
                    <tr>
                        <th>字段变更列表：</th>
                        <td colspan="5">
                            <uc:uc_change_field ID="uc_change_field1" runat="server" />
                        </td>
                    </tr>
                </tbody>
                <!-- 字段变更列表 ed -->

                <!-- 审批列表 st -->
                <tbody id="assessment" runat="server">
                    <tr>
                        <td class="title" colspan="6">审批列表</td>
                    </tr>
                    <tr>
                        <td colspan="6">
                            <uc:DwzAssessmentList ID="DwzAssessmentList1" runat="server" />
                        </td>
                    </tr>
                </tbody>
                <!-- 审批列表 ed -->

                <!-- 相关附件 st -->
                <tbody>
                    <tr>
                        <th>相关附件：</th>
                        <td colspan="5">
                            <uc:ajaxUpload ID="ajaxUpload1" runat="server" />
                        </td>
                    </tr>
                </tbody>
                <!-- 相关附件 ed -->

                <!-- 审批意见 st -->
                <tbody>
                    <uc:DwzAssessment ID="DwzAssessment1" runat="server" />
                </tbody>
                <!-- 审批意见 ed -->
            </table>
            <!-- 门店主数据变更表单 ed -->

            <!-- 操作按钮 st -->
            <%  if (H2.NET.Common.AksRequest.GetString("showbtn") != "0")
                { %>
            <div style="margin: 5px; padding-bottom: 10px; text-align: center;">
                <asp:Button ID="btn_submit" runat="server" CssClass="u-btn" Text="提交(Submit)" OnClick="btn_submit_Click" OnClientClick="return confirmSubmit();" />
                <input type="button" class="u-btn u-btn-c4" value="关闭(Close)" onclick="custom_close()" />
                <asp:HyperLink ID="hl_ExportPdf" runat="server" Visible="false" Target="_blank" CssClass="u-btn u-btn-c3" Style="height: 28px; line-height: 28px; display: inline-block;">生成(PDF)</asp:HyperLink>
                <asp:Button ID="btn_print" runat="server" CssClass="u-btn u-btn-c2" Text="打印(Print)" OnClientClick="window.print()" Visible="false" />
            </div>
            <%  } %>
            <!-- 操作按钮 ed -->
        </form>
    </div>
    <div id="search_subdealer" style="display: none;">
        <uc:uc_search_subdealer ID="uc_search_subdealer1" runat="server" />
    </div>
    <div id="search_bmc" style="display: none;">
        <uc:uc_search_bmc ID="uc_search_bmc1" runat="server" />
    </div>
    <div id="search_accountowner" style="display: none;">
        <uc:uc_search_accountowner ID="uc_search_accountowner1" runat="server"></uc:uc_search_accountowner>
    </div>
    <div id="search_store" style="display: none;">
        <uc:uc_search_store ID="uc_search_store1" runat="server" />
    </div>
</body>
</html>
